/**
  ******************************************************************************
  * @file    motor_wheel.c
  * @brief   motor wheel function
  */
/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"
#include "stm32f1xx.h"
#include "stm32f1xx_it.h"
#include <stdio.h>

#include "motor_wheel.h"

MOTOR_WHEEL_TypeDef   wheels[MAX_MOTOR_WHEELS];

void init_motor_wheels (void)
{
    for (int i=0; i<MAX_MOTOR_WHEELS; i++)
    {
        wheels[i].total_hall_count = 0;
        wheels[i].current_hall_count = 0;
        wheels[i].previous_hall_count = 0;

        wheels[i].previous_pin_status = GPIO_PIN_RESET;

        wheels[i].duty_cycle = 88;
    }
}


